package dfbz.文件复制练习;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class demo02 {
    public static void main(String[] args) throws IOException {
        //将硬盘的东西读出
        FileInputStream fis=new FileInputStream(new File("D:\\Navicat Keygen Patch v5.6.0 DFoX.exe"));
        //将内存的东西 写入到 硬盘  写入   D:\copy.jpeg目的地
        FileOutputStream fos = new FileOutputStream(new File("D:\\copy.exe"));
        int len;
        byte[] bytes=new byte[1024];
        while ((len=fis.read(bytes))!=-1){
            fos.write(bytes);
        }
        fos.close();
        fis.close();
    }
}
